package com.other.springbootconfigureorder;

import com.other.springbootconfigureorder.test.UserProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
public class SpringbootConfigureOrderApplication {
    @Autowired
    UserProperties userProperties;

    public static void main(String[] args) {
        SpringApplication.run(SpringbootConfigureOrderApplication.class, args);
    }


    @Bean
    public CommandLineRunner commandLineRunner() {
        return args -> {
            System.out.println(System.getProperty("user.name"));
            System.out.println(userProperties.toString());
        };
    }

}
